

<template>
  <div class="slot-use">
    <slot name="header">
      Header
    </slot>

    <!--默认插槽、作用域插槽：子组件给父组件传值。-->
    <slot :row="userInfo" :index="1"></slot>

    <slot name="footer"></slot>
  </div>
</template>
<script setup lang="ts">
const userInfo = {
  name:'zs',
  age: 11,
  sex:'male'
}
</script>
<style scoped>

</style>
